home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15004 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.3 KB

  1. Path: line161.nwm.mindlink.net!user
  2. From: emery@grebyn.com (David Emery)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 3 Apr 1996 03:37:56 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <emery-0204961939490001@line161.nwm.mindlink.net>
  8. References: <JSA.96Feb16135027@organon.com> <31582A63.4BE9@east.thomsoft.com> <4jeel1$erh@tpd.dsccc.com> <JSA.96Mar29195546@organon.com> <4jp388$d56@tpd.dsccc.com> <828445854snz@genesis.demon.co.uk> <emery-0204960656230001@line030.nwm.mindlink.net> <3161447e.494168937@news.dimensional.com>
  9. NNTP-Posting-Host: line161.nwm.mindlink.net
  10.  
  11. In article <3161447e.494168937@news.dimensional.com>,
  12. cjames@melchizedek.cec-services.com wrote:
  13.  
  14. > emery@grebyn.com (David Emery) posted with deletions:
  15. > | In article <828445854snz@genesis.demon.co.uk>,
  16. fred@genesis.demon.co.uk wrote:
  17. > |  
  18. > | > ANSI C doesn't define UNIX OS calls so isn't really relevant to your
  19. point.
  20. > | > Unix calls are reasonably standardised for C through the likes of
  21. POSIX and
  22. > | > X/Open which is natural because C is the core development language for
  23. > | > the platform.
  24. > | > 
  25. > | > -- 
  26. > | > -----------------------------------------
  27. > | > Lawrence Kirby | fred@genesis.demon.co.uk
  28. > | > Wilts, England | 70734.126@compuserve.com
  29. > | > -----------------------------------------
  30. > | 
  31. > | This is not exactly true.  The POSIX.1 standard make extensive use of
  32. > | facilities in the ANSI C standard.  Chapter 2 contains a list of library
  33. > | calls of ANSI C "included" in POSIX (e.g. malloc(), while Chapter 8 
  34. > | contains C-specific facilities, that refine the behavior of some ANSI 
  35. > | C library routines such as file stream IO.
  36. > | 
  37. > |             dave
  38. > Apparently pitiful, forgetful Dave Emery thinks this relates to Ada.
  39. > ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  40. > Colin James III, Principal Scientist  cjames@cec-services.com
  41. > CEC Services, 2080 Kipling St, Lakewood, CO  80215-1502   USA
  42. > Voice: 303.231.9437;  Facsimile: .231.9438 
  43. > ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
  44.  
  45. Of course, if CJ Disease knew anything about POSIX, then he would be aware
  46. of the dependence that all POSIX standards, including the Ada binding, 
  47. implicitly have on facilities in ANSI C.  Furthermore, each POSIX binding
  48. has a chapter for language-specific facilities, Chapter 8.  The POSIX/Ada
  49. binding Chapter 8 covers the interpretation of Text_IO facilities in
  50. a POSIX context.  In particular, it defines the syntax and semantics of
  51. the FORM parameter for Text_IO.Open and Text_IO.Create, allowing such
  52. things as Append mode, access to POSIX file descriptors, etc.
  53.  
  54. The implicit dependency that each POSIX standard has on "the mother document",
  55. POSIX.1, and its relationship to ANSI C, is particularly important for multi-
  56. language programming, since it defines, for most current POSIX implementations,
  57. the underlying mechanisms used by the various languages.  At some level, both
  58. C and Ada runtime systems have to allocate memory.  It is important that
  59. these allocation systems be interoperable (so memory allocated from C can be
  60. read in Ada, and vice versa), and a common approach to doing this is to build
  61. the Ada allocator on top of, or at least in cooperation with, C's malloc().
  62.  
  63. So, CJ Disease, go bite a mad cow...  
  64.  
  65.             dave
  66.